package com.jiusit.onePurchase.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import com.jfinal.plugin.activerecord.Db;
import com.jiusit.common.utils.DateUtil;
public class TimedTask implements Job{

	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		String end_date = DateUtil.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
		String updateStatus="update purchase_time_slot set is_over='1' , status='04'  where end_date<=Now() and is_over='0'";
		Db.update(updateStatus);
	}
}
